require("lualib_bundle");
__TS__SourceMapTraceBack(debug.getinfo(1).short_src, {["4"] = 1,["5"] = 1,["6"] = 1,["8"] = 7,["9"] = 8,["10"] = 9,["11"] = 6,["12"] = 12,["13"] = 13,["14"] = 14,["15"] = 15,["16"] = 16,["17"] = 17,["18"] = 17,["19"] = 17,["20"] = 17,["22"] = 12,["23"] = 3,["24"] = 1});
local ____exports = {}
____exports.default = __TS__Class()
local AddAbility2UnitOnUseAbilityState = ____exports.default
AddAbility2UnitOnUseAbilityState.name = "AddAbility2UnitOnUseAbilityState"
function AddAbility2UnitOnUseAbilityState.prototype.____constructor(self)
    local triggerHandle = CreateTrigger()
    TriggerRegisterAnyUnitEventBJ(triggerHandle, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    TriggerAddAction(triggerHandle, ____exports.default.action)
end
function AddAbility2UnitOnUseAbilityState.action()
    local spellAbilityIdStr = id2string(GetSpellAbilityId())
    local cfgData = ____exports.default.config[spellAbilityIdStr]
    if cfgData then
        local unit = GetTriggerUnit()
        UnitAddAbility(
            unit,
            FourCC(cfgData)
        )
    end
end
AddAbility2UnitOnUseAbilityState.config = {}
____exports.default = AddAbility2UnitOnUseAbilityState
return ____exports
